<template>
	<view>
		<image src="https://cos.golfren.vip/wx-mini/static/i1.png" mode=""
			style="border-radius: 50%;margin-left: 10rpx;" v-if="permission[key.creator] === 1"></image>
		<image src="https://cos.golfren.vip/wx-mini/static/i1.png" mode=""
			style="border-radius: 50%;margin-left: 10rpx;" v-if="permission[key.shopping_mall] === 2"></image>
	</view>
</template>

<script>
	export default {
		name: "icon",
		props: {
			permission: {
				type: Object,
				default: () => {}
			},
			keyValue: {
				type: Object,
				default: () => {}
			}
		},
		data() {
			return {
				key: {
					//creator = 1是视频图标
					creator: 'creator',
					//shopping_mall =2是商城图标
					shopping_mall: 'shopping_mall',
				}
			}
		},
		watch:{
			keyValue:{
				handler(val){
					this.key = {...this.key, ...val}
				},
				immediate: true,
				deep: true
			}
		}
	}
</script>

<style>

</style>